#ifndef _ADC_APP_H_
#define _ADC_APP_H_

#include "dma.h"

#define ADC_Baseline 3300  // ADC的输入电压基准 3300mV
#define ADC_Accuracy 4095  // 12位ADC  4095

void get_sensor_data(void);

extern struct can1_rx0_buf_info can1_rx0_buf;
extern struct can1_rx1_buf_info can1_rx1_buf;

short          LinearInsert(unsigned int T_Value);
unsigned short get_max(unsigned int dma_buf[ADC_DMA_BUF_NUM][ADC_CHANNEL_NUM], unsigned char channel_num, unsigned int len);
short          NTC_Caculate(unsigned short T_Data);
unsigned short averge_adc_data(unsigned int dma_buf[ADC_DMA_BUF_NUM][ADC_CHANNEL_NUM], unsigned char channel_num, unsigned char len);
void           init_adc_app_var(void);
#endif
